package cn.edu.scau.cmi.huangxiaodong.exercise9;
import java.util.*;
public class Exercise9 {
	// String x="1";
	int y=2;
	public static void main(String[] args) {
		Scanner cin = new Scanner(System.in);
		int d1, d2, m1, m2, y1, y2;
		y1 = cin.nextInt();
		m1 = cin.nextInt();
		d1 = cin.nextInt();
		y2 = cin.nextInt();
		m2 = cin.nextInt();
		d2 = cin.nextInt();
		Calendar da = Calendar.getInstance();
		da.set(y1, m1, d1);
		long ms1 = da.getTimeInMillis();
		da.set(y2, m2, d2);
		long ms2 = da.getTimeInMillis();
		System.out.println((ms2 - ms1) / (1000 * 60 * 60 * 24));
		cin.close();
	}

}
